home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Full / Paragon Drive Backup 9 / DB90_SE_x64.msi / Data1.cab / _83419A8A23324888AB3B88D0C96A78E5 < prev    next >
Extensible Markup Language  |  2008-06-28  |  7KB  |  336 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.     <xsl:output method="html" version="4.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>
  4.  
  5.     <xsl:template match="/wipereport">
  6.         <table width="100%" border="0">
  7.             <!-- Report header -->
  8.             <tr>
  9.                 <td colspan="2">
  10.                     <b>QT_TRANSLATE_NOOP("QObject", "Data Sanitization Report (<WiperProductFullNameWithVersion>)")</b>
  11.                     <br/>
  12.                     <b>QT_TRANSLATE_NOOP("QObject", "Check the data erased according to the following requirements:")</b>
  13.                 </td>
  14.             </tr>
  15.             <tr>
  16.                 <td valign="center" colspan="2">
  17.                     <img src="hline_gray"/>
  18.                 </td>
  19.             </tr>
  20.             <!-- Hdd Info -->
  21.             <xsl:apply-templates select="hddinfo"/>
  22.             <!-- General Info -->
  23.             <xsl:apply-templates select="operation"/>
  24.             <!-- Algorithm Info -->
  25.             <xsl:apply-templates select="algorithm"/>
  26.             <!-- Bad Blocks Info -->
  27.             <xsl:apply-templates select="badblocks"/>
  28.             <!-- Dump -->
  29.             <xsl:apply-templates select="sectors"/>
  30.         </table>
  31.     </xsl:template>
  32.     
  33.     <xsl:template match="hddinfo">
  34.         <tr>
  35.             <td colspan="2">
  36.                 <nobr>
  37.                     <b>QT_TRANSLATE_NOOP("QObject", "Hard Disk Info")</b>
  38.                 </nobr>
  39.             </td>
  40.         </tr>
  41.         <tr>
  42.             <td valign="center" colspan="2">
  43.                 <img src="hline_gray"/>
  44.             </td>
  45.         </tr>
  46.         <tr>
  47.             <td>
  48.                 <nobr>
  49.                     <b>QT_TRANSLATE_NOOP("QObject", "Hard Disk")</b>
  50.                 </nobr>
  51.             </td>
  52.             <td>
  53.                 <xsl:value-of select="name"/>
  54.             </td>
  55.         </tr>
  56.         <xsl:if test="string-length(serial) != 0">
  57.             <tr>
  58.                 <td>
  59.                     <nobr>
  60.                         <b>QT_TRANSLATE_NOOP("QObject", "Serial Number")</b>
  61.                     </nobr>
  62.                 </td>
  63.                 <td>
  64.                     <xsl:value-of select="serial"/>
  65.                 </td>
  66.             </tr>
  67.         </xsl:if>
  68.         <tr>
  69.             <td>
  70.                 <nobr>
  71.                     <b>QT_TRANSLATE_NOOP("QObject", "Capacity")</b>
  72.                 </nobr>
  73.             </td>
  74.             <td>
  75.                 <xsl:value-of select="capasity"/>
  76.             </td>
  77.         </tr>
  78.     </xsl:template>
  79.     
  80.     <xsl:template match="operation">
  81.         <tr>
  82.             <td colspan="2"/>
  83.         </tr>
  84.         <tr>
  85.             <td colspan="2">
  86.                 <nobr>
  87.                     <b>QT_TRANSLATE_NOOP("QObject", "General Info")</b>
  88.                 </nobr>
  89.             </td>
  90.         </tr>
  91.         <tr>
  92.             <td valign="center" colspan="2">
  93.                 <img src="hline_gray"/>
  94.             </td>
  95.         </tr>
  96.         <tr>
  97.             <td>
  98.                 <nobr>
  99.                     <b>QT_TRANSLATE_NOOP("QObject", "Object")</b>
  100.                 </nobr>
  101.             </td>
  102.             <td>
  103.                 <xsl:value-of select="object"/>
  104.             </td>
  105.         </tr>
  106.         <tr>
  107.             <td>
  108.                 <nobr>
  109.                     <b>QT_TRANSLATE_NOOP("QObject", "Free Space Only")</b>
  110.                 </nobr>
  111.             </td>
  112.             <td>
  113.                 <xsl:choose>
  114.                     <xsl:when test="object/@onlyFreeSpace=1">QT_TRANSLATE_NOOP("QObject", "Yes")</xsl:when>
  115.                     <xsl:otherwise>QT_TRANSLATE_NOOP("QObject", "No")</xsl:otherwise>
  116.                 </xsl:choose>
  117.             </td>
  118.         </tr>
  119.         <tr>
  120.             <td>
  121.                 <nobr>
  122.                     <b>QT_TRANSLATE_NOOP("QObject", "Start Time")</b>
  123.                 </nobr>
  124.             </td>
  125.             <td>
  126.                 <xsl:value-of select="starttime"/>
  127.             </td>
  128.         </tr>
  129.         <tr>
  130.             <td>
  131.                 <nobr>
  132.                     <b>QT_TRANSLATE_NOOP("QObject", "End Time")</b>
  133.                 </nobr>
  134.             </td>
  135.             <td>
  136.                 <xsl:value-of select="finishtime"/>
  137.             </td>
  138.         </tr>
  139.     </xsl:template>
  140.     
  141.     <xsl:template match="algorithm">
  142.         <tr>
  143.             <td colspan="2"/>
  144.         </tr>
  145.         <tr>
  146.             <td colspan="2">
  147.                 <nobr>
  148.                     <b>QT_TRANSLATE_NOOP("QObject", "Algorithm Info")</b>
  149.                 </nobr>
  150.             </td>
  151.         </tr>
  152.         <tr>
  153.             <td valign="center" colspan="2">
  154.                 <img src="hline_gray"/>
  155.             </td>
  156.         </tr>
  157.         <tr>
  158.             <td>
  159.                 <nobr>
  160.                     <b>QT_TRANSLATE_NOOP("QObject", "Name")</b>
  161.                 </nobr>
  162.             </td>
  163.             <td>
  164.                 <xsl:value-of select="name"/>
  165.             </td>
  166.         </tr>
  167.         <tr>
  168.             <td>
  169.                 <nobr>
  170.                     <b>QT_TRANSLATE_NOOP("QObject", "Description")</b>
  171.                 </nobr>
  172.             </td>
  173.             <td>
  174.                 <xsl:value-of select="description"/>
  175.             </td>
  176.         </tr>
  177.         <tr>
  178.             <td>
  179.                 <nobr>
  180.                     <b>QT_TRANSLATE_NOOP("QObject", "Write Pass Count")</b>
  181.                 </nobr>
  182.             </td>
  183.             <td>
  184.                 <xsl:value-of select="writepass"/>
  185.             </td>
  186.         </tr>
  187.         <tr>
  188.             <td>
  189.                 <nobr>
  190.                     <b>QT_TRANSLATE_NOOP("QObject", "Verify Pass Count")</b>
  191.                 </nobr>
  192.             </td>
  193.             <td>
  194.                 <xsl:value-of select="verifypass"/>
  195.             </td>
  196.         </tr>
  197.         <tr>
  198.             <td>
  199.                 <nobr>
  200.                     <b>QT_TRANSLATE_NOOP("QObject", "Verify Percent")</b>
  201.                 </nobr>
  202.             </td>
  203.             <td>
  204.                 <xsl:value-of select="verifyPercent"/>
  205.             </td>
  206.         </tr>
  207.     </xsl:template>
  208.     
  209.     <xsl:template match="badblocks">
  210.         <tr>
  211.             <td colspan="2"/>
  212.         </tr>
  213.         <tr>
  214.             <td colspan="2">
  215.                 <nobr>
  216.                     <b>QT_TRANSLATE_NOOP("QObject", "Bad Blocks Info")</b>
  217.                 </nobr>
  218.             </td>
  219.         </tr>
  220.         <tr>
  221.             <td valign="center" colspan="2">
  222.                 <img src="hline_gray"/>
  223.             </td>
  224.         </tr>
  225.         <tr>
  226.             <td>
  227.                 <nobr>
  228.                     <b>QT_TRANSLATE_NOOP("QObject", "Total Bad Blocks")</b>
  229.                 </nobr>
  230.             </td>
  231.             <td>
  232.                 <xsl:value-of select="count"/>
  233.             </td>
  234.         </tr>
  235.         <xsl:variable name="badblocks" select="list/badblock"/>
  236.         <xsl:choose>
  237.             <xsl:when test="count($badblocks) > 0">
  238.                 <tr>
  239.                     <td>
  240.                         <nobr>
  241.                             <b>QT_TRANSLATE_NOOP("QObject", "List")</b>
  242.                         </nobr>
  243.                     </td>
  244.                     <td>
  245.                         <xsl:call-template name="badblocklist">
  246.                             <xsl:with-param name="badblocks" select="$badblocks"/>
  247.                         </xsl:call-template>
  248.                     </td>
  249.                 </tr>
  250.             </xsl:when>
  251.         </xsl:choose>
  252.     </xsl:template>
  253.     
  254.     <xsl:template name="badblocklist">
  255.         <xsl:param name="badblocks"/>
  256.         <xsl:choose>
  257.             <xsl:when test="count($badblocks) > 1">
  258.                 <xsl:variable name="head" select="$badblocks[1]"/>
  259.                 <xsl:variable name="tail">
  260.                     <xsl:call-template name="badblocklist">
  261.                         <xsl:with-param name="badblocks" select="$badblocks[position() != 1]"/>
  262.                     </xsl:call-template>
  263.                 </xsl:variable>
  264.                 <xsl:choose>
  265.                     <xsl:when test="$tail">
  266.                         <xsl:value-of select="concat($head, ', ', $tail)"/>
  267.                     </xsl:when>
  268.                     <xsl:otherwise>
  269.                         <xsl:value-of select="$head"/>
  270.                     </xsl:otherwise>
  271.                 </xsl:choose>
  272.             </xsl:when>
  273.             <xsl:when test="count($badblocks) = 1">
  274.                 <xsl:value-of select="$badblocks[1]"/>
  275.             </xsl:when>
  276.         </xsl:choose>
  277.     </xsl:template>
  278.  
  279.     <xsl:template match="sectors">
  280.         <tr>
  281.             <td colspan="2"/>
  282.         </tr>
  283.         <tr>
  284.             <td colspan="2">
  285.                 <nobr>
  286.                     <b>QT_TRANSLATE_NOOP("QObject", "Dump")</b>
  287.                 </nobr>
  288.             </td>
  289.         </tr>
  290.         <tr>
  291.             <td valign="center" colspan="2">
  292.                 <img src="hline_gray"/>
  293.             </td>
  294.         </tr>
  295.         <xsl:apply-templates select="sector"/>
  296.     </xsl:template>
  297.     
  298.     <xsl:template match="sector">
  299.         <tr>
  300.             <td>
  301.                 <nobr>
  302.                     <b>QT_TRANSLATE_NOOP("QObject", "Sector")</b>
  303.                 </nobr>
  304.             </td>
  305.             <td>
  306.                 <xsl:value-of select="@address"/>
  307.             </td>
  308.         </tr>
  309.  
  310.         <tr>
  311.             <td colspan="2">
  312.                 <table cellspacing="1">
  313.                     <xsl:call-template name="dumper">
  314.                         <xsl:with-param name="bytes" select="byte"/>
  315.                     </xsl:call-template>
  316.                 </table>
  317.             </td>
  318.         </tr>
  319.     </xsl:template>
  320.     
  321.     <xsl:template name="dumper">
  322.         <xsl:param name="bytes"/>
  323.         
  324.         <xsl:if test="$bytes">
  325.             <tr>
  326.                 <xsl:for-each select="$bytes[16 >= position()]"><td><xsl:value-of select="."/></td></xsl:for-each>
  327.             </tr>
  328.             
  329.             <xsl:call-template name="dumper">
  330.                 <xsl:with-param name="bytes" select="$bytes[position() > 16]"/>
  331.             </xsl:call-template>
  332.         </xsl:if>
  333.     </xsl:template>
  334.     
  335. </xsl:stylesheet>
  336.